
public class test {
	
    public static void main(final String[] the_args) {
    	
    	int [] array = new int[9];
    	array[0] = 3;
    	array[1] = 2;
    	array[2] = 7;
    	array[3] = 9;
    	array[4] = 4;
    	array[5] = 12;
    	array[6] = 5;
    	array[7] = 1;
    	array[8] = 0;

    	
    	find_m_me(array,8);
    }
    
    public static boolean find_m_me(int[] a, int m){
    	int n = a.length;
    	int p =0;
    	for(int i=0; i<n; i++)
    		for(int j=i+1; j<n; j++)
    			for(int k=j+1; k<n; k++)
    				if (m ==(a[i]+a[j]+a[k])){
    					System.out.print(a[i]);
    					System.out.print(a[j]);
    					System.out.print(a[k]);
    					return true;
    				}
		return false;
    }

}
